const os = require('os');
const express = require('express');
const app = express();
 
app.get('/username', (req, res) => {
  const username = os.userInfo().username;
  res.send(`当前登录的用户名是: ${username}`);
});
 
const PORT = 3000;
app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}`);
});